/* 新闻详情页面样式 */

/* 统一顶部样式 */
#Header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    border: none !important;
    color: white !important;
}

#Header h1 {
    color: white !important;
    text-align: center !important;
    font-weight: 600 !important;
}

#Header .nav-btn {
    color: white !important;
    border-radius: 50%;
    transition: background 0.3s ease;
}

#Header .nav-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

#Header .nav-btn .fa {
    color: white !important;
}

/* 内容区域样式 */
.scrollbox {
    background: #f8f9fa;
    min-height: 100vh;
    padding-top: 3.5em; /* 为固定header留出空间 */
    padding-bottom: 40px; /* 底部间距 */
}

/* 新闻图片容器 */
.news-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
}

/* 新闻标题区域 */
.news-header {
    background: white;
    padding: 20px;
    margin: -15px 20px 20px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

/* 新闻标题样式 - 放大字号 */
.news-title {
    font-size: 24px !important;
    font-weight: 700;
    line-height: 1.4;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
}

/* 新闻元信息样式 */
.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-source {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.news-divider {
    color: #ddd;
    font-size: 14px;
}

.news-time {
    color: #999;
    font-size: 13px;
}

/* 新闻内容区域 */
.news-content-wrapper {
    background: white;
    margin: 0 20px 20px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.news-content {
    padding: 25px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* 新闻内容样式美化 */
.news-content p {
    margin-bottom: 16px;
    text-align: justify;
}

.news-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 20px 0 12px 0;
    color: #2c3e50;
}

.news-content ul {
    margin: 15px 0;
    padding-left: 0;
}

.news-content li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    list-style: none;
}

.news-content li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 8px;
}

.news-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* 评论区域美化 */
.comment-section {
    background: white;
    margin: 0 20px 20px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    overflow: hidden;
}

.comment-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

#commentList {
    background: white;
}

.comment-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-username {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
    margin-bottom: 5px;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

/* 评论输入区域 */
.comment-input-section {
    background: white;
    margin: 0 20px 20px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    padding: 20px;
}

#commentInput {
    width: 100%;
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
    line-height: 1.5;
}

#commentInput:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#commentInput::placeholder {
    color: #aaa;
}

/* 发表评论按钮 */
.comment-submit-area {
    margin-top: 15px;
    text-align: right;
}

#submitComment {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#submitComment:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#submitComment:active {
    transform: translateY(0);
    opacity: 0.9;
}

/* 登录界面样式 */
.login-prompt-section {
    text-align: center;
    padding: 30px 20px;
}

.login-prompt-text h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-prompt-text p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.login-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.go-to-login-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.go-to-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 用户信息栏样式 */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 18px;
    margin-bottom: 20px;
}

.current-user {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.current-user::before {
    content: "\f007";
    font-family: FontAwesome;
    margin-right: 8px;
    color: #667eea;
    font-size: 16px;
}

#currentUsername {
    color: #667eea;
    font-weight: 600;
    margin-left: 6px;
}

.logout-btn {
    padding: 8px 16px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(149, 165, 166, 0.3);
}

.logout-btn:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.4);
}

.logout-btn:active {
    transform: translateY(0);
    opacity: 0.9;
}

/* 响应式调整 */
@media screen and (max-width: 480px) {
    .news-title {
        font-size: 20px !important;
    }
    
    .news-content {
        padding: 20px;
        font-size: 15px;
    }
    
    .news-image-container {
        height: 180px;
    }
    
    .news-header {
        margin: -10px 15px 15px 15px;
        padding: 15px;
    }
    
    .news-content-wrapper {
        margin: 0 15px 15px 15px;
    }
    
    .comment-section {
        margin: 0 15px 15px 15px;
    }
    
    .comment-input-section {
        margin: 0 15px 30px 15px;
    }
    
    /* 登录界面响应式优化 */
    .login-prompt-section {
        padding: 20px 15px;
    }
    
    .go-to-login-btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .user-info .logout-btn {
        align-self: flex-end;
    }
}

/* 新闻内容 */
.news-content {
    background: #fff;
    margin: 1em;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.news-title {
    font-size: 1.3em;
    line-height: 1.4em;
    color: #2d3436;
    font-weight: 600;
    margin-bottom: 1em;
}

.news-info {
    padding: 1em 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5em;
}

.news-body {
    color: #2d3436;
    line-height: 1.6em;
    font-size: 1em;
}

.news-body p {
    margin-bottom: 1em;
}

.news-body ul {
    margin: 1em 0;
    padding-left: 1.5em;
}

.news-body li {
    margin-bottom: 0.5em;
    line-height: 1.5em;
}

.news-body strong {
    color: #6c5ce7;
    font-weight: 600;
}

.news-tags {
    padding: 1em 0;
    border-top: 1px solid #e9ecef;
    margin-top: 1.5em;
}

.news-tag {
    display: inline-block;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: #fff;
    padding: 0.3em 0.8em;
    border-radius: 20px;
    font-size: 0.8em;
    margin-right: 0.5em;
    margin-bottom: 0.5em;
}

/* 评论区域 */
.comment-section {
    background: #fff;
    margin: 1em;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.comment-username {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.95em;
}

.comment-content {
    color: #636e72;
    line-height: 1.5em;
    margin: 0.5em 0;
}

.comment-like {
    color: #636e72;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.3em 0.5em;
    border-radius: 15px;
}

.comment-like:hover {
    background: #e9ecef;
    color: #6c5ce7;
}

.comment-like:active {
    transform: scale(0.95);
}

/* 底部操作栏 */
.news-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e9ecef;
    padding: 0.8em 0;
    z-index: 100;
}

.news-footer > div {
    color: #636e72;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 0.5em;
    border-radius: 8px;
    margin: 0 0.2em;
}

.news-footer > div:hover {
    background: #f1f2f6;
    color: #6c5ce7;
}

.news-footer > div:active {
    transform: scale(0.95);
}

.news-footer .fa-heart {
    color: #e17055;
}

.news-footer .fa-star {
    color: #fdcb6e;
}

/* 通用样式 */
.umar-t {
    margin-top: 1em;
}

.umar-t-s {
    margin-top: 0.5em;
}

.umar-t-xs {
    margin-top: 0.3em;
}

.umar-l {
    margin-left: 1em;
}

.umar-l-s {
    margin-left: 0.5em;
}

.umar-r-s {
    margin-right: 0.3em;
}

.uinn {
    padding: 1em;
}

.ulh-1 {
    line-height: 1.6em;
}

.t-gra {
    color: #636e72;
}

.tx-c {
    text-align: center;
}

.ulev-1 {
    font-weight: 500;
    font-size: 1em;
}

.ulev-2 {
    font-weight: 600;
    font-size: 1.1em;
}

.ulev--1 {
    font-size: 0.9em;
}

.ubb {
    border-bottom: 1px solid #e9ecef;
}

.uhide {
    display: none;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .news-title {
        font-size: 1.2em;
    }
    
    .comment-textarea {
        font-size: 0.9em;
    }
    
    .news-footer > div {
        padding: 0.3em;
        margin: 0 0.1em;
    }
    
    .news-footer span {
        font-size: 0.8em;
    }
}

/* 头部收藏按钮 */
#favoriteBtn {
    transition: all 0.3s ease;
    position: relative;
}

#favoriteBtn:hover {
    transform: scale(1.1);
}

#favoriteBtn:active {
    transform: scale(0.95);
}

#favoriteBtn.favorited .fa {
    color: #e74c3c !important;
    animation: heartBeat 0.8s ease;
}

#favoriteBtn .fa {
    transition: all 0.3s ease;
}

#favoriteBtn:not(.favorited) .fa:hover {
    color: #e74c3c !important;
    transform: scale(1.1);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 分享按钮样式 */
#shareBtn {
    transition: all 0.3s ease;
}

#shareBtn:hover {
    transform: scale(1.1);
} 